/**
 * Copyright (C) 2019-2021 杭州优诗科技有限公司
 *
 * This file is part of UnitSpirit.
 * @author wupingfu
 * @version 1.0.0
 * 
 **/
package com.unitspirit.sample.generics;

import java.util.Optional;

/**
 * @author wupf
 *
 */
public class Generic6 {
	
	BaseBean<?> studentBaseBean2 = new BaseBean<Student>();
	java.util.Optional<?> cOptional2=Optional.of("abc");
	public static void main(String[] args) {
        BaseBean<Student> studentBaseBean = new BaseBean<Student>();
        Student s1 = new Student();
        s1.setName("lee");
        s1.setSex("man");
        s1.setAge(18);
        studentBaseBean.setValue(s1);
        
        //class文件反编译后的：Student value = (Student)studentBaseBean.getValue();
        Student value = studentBaseBean.getValue();
 
        System.out.println("student : "+ value);
    }

	public void abc(int i) {

		java.util.Optional<String> cOptional=Optional.of("abc");
		Object obj= cOptional.get();
		String str= cOptional.get();
		
		java.util.Optional<Integer> cOptiona2=Optional.of(12);
		Object obj2= cOptiona2.get();
		int i2= cOptiona2.get();
		
        Student s1 = new Student();
        s1.setName("lee");
        s1.setSex("man");
        s1.setAge(18);
		java.util.Optional<Student> cOptiona3=Optional.of(s1);
		Object obj3= cOptiona3.get();
		Student s3= cOptiona3.get();
		
    }
	public void abc() {
        BaseBean<Student> studentBaseBean = new BaseBean<Student>();
        Student s1 = new Student();
        s1.setName("lee");
        s1.setSex("man");
        s1.setAge(18);
        studentBaseBean.setValue(s1);
        
        //class文件反编译后的：Student value = (Student)studentBaseBean.getValue();
        Student value = studentBaseBean.getValue();
 
        System.out.println("student : "+ value);
    }
}
